padarray
B = padarray(A, padsize; padval=nothing)
Pad matrix A with an amount of padding in each dimension specified by padsize.
Args
A: GMTimage, GMTgrid or Matrix to pad.
padsize: Amount of padding in each dimension. It can be a scalar or a array of length equal to 2 (only matrices are supported).
Kwargs
padval: If not specified,Ais padded with a replication of the first/last row and column, otherwisepadvalspecifies a constant value to use for padded elements.padvalcan take the value -Inf or Inf, in which case the smallest or largest representable value of the type ofAis used, respectively.
Return
Padded array of same type as input.
Example
A = [1 2; 3 4];
B = padarray(A,1)
4×4 Matrix{Int64}:
1 1 2 2
1 1 2 2
3 3 4 4
3 3 4 4
© GMT.jl. Last modified: January 10, 2025. Website built with Franklin.jl and the Julia programming language.
These docs were autogenerated using GMT: v1.23.0